package p2pcdnsim.network;

import p2pcdnsim.exception.LinkAlreadyInsertedException;
import p2pcdnsim.exception.NodeAlreadyInsertedException;
import p2pcdnsim.exception.NodeUnexistentException;
import desmoj.core.simulator.Model;

public abstract class NetworkTopologyBuilder {
	
	protected NetworkTopology topology;
	
	public NetworkTopology getNetworkTopology() {
		return topology;
	}
	
	protected void createNewTopology(Model owner) {
		topology = new NetworkTopology(owner);
	}
	
	public abstract void createNodes() throws NodeAlreadyInsertedException;
	public abstract void createLinks() throws NodeUnexistentException, LinkAlreadyInsertedException;
	public abstract void buildNetworkStack() throws NodeUnexistentException;
	public abstract void attributeNodeAddresses() throws NodeUnexistentException;
	public abstract void assignRouterTables() throws NodeUnexistentException;
	public abstract void createBus() throws NodeUnexistentException;
}
